package org.laobai.shop.goods.service.impl;

import java.util.List;

import org.apache.dubbo.config.annotation.DubboService;
import org.laobai.shop.goods.entity.Brand;
import org.laobai.shop.goods.mapper.BrandMapper;
import org.laobai.shop.goods.service.BrandService;
import org.springframework.beans.factory.annotation.Autowired;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;

@DubboService
public class BrandServiceImpl implements BrandService {
	@Autowired
	private BrandMapper brandMapper;
	
	@Override
	public PageInfo<Brand> page(int currPage, Brand brand) {
		PageHelper.startPage(currPage, 3);
		List<Brand> tmp = brandMapper.brandList(brand);
		return new PageInfo<>(tmp);
	}

	@Override
	public List<Brand> list() {
		return brandMapper.brandList(null);
	}

}
